unit PlayerUnit;

interface

uses common;

type
  Player = class
    function move(height, lastNumber, sortedNumber : integer; arr : array of integer) : integer;
  end;


implementation

{ Player }

function Player.move(height, lastNumber, sortedNumber : integer; arr : array of integer): integer;
var max, i: integer;
begin
  max:= -1;
  repeat
    inc(max);
  until (arr[max]<=height) or (max=n-1-sortedNumber);
  move:= HIT (max);
end;

end.
 